<extend name="Public:index" />
<block name="main-crumb">
    <li class="active">传感器增加</li>
</block>
<block name="mycss">
      <link href="__PUBLIC__/assets/plugins/colorpicker/asColorPicker.min.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/assets/css/style.css" rel="stylesheet" type="text/css" />
</block>

<block name="main-content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-body">
                        <form id="add_form" name="add_form" action="{:U(\'sensor_add\')}" method="post">
                            <table class="table table-bordered mb-0 table-centered">
                                <tr>
                                    <td width="20%" class="tableleft">末端设备名称：</td>
                                    <td>
                                        <input type="text" name="data[sensor_name]" id="sensor_name" class="form-control" />
                                    </td>
                                </tr>
                               <tr>
                                    <td class="tableleft">是否计入统计：</td>
                                    <td>
                                       <div class="checkbox checkbox-success">
                                                    <input id="is_count" class="min_input" name="data[is_count]" type="checkbox" checked>
                                                    <label for="is_count">
                                                    计入
                                                    </label>
                                            </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tableleft">末端设备ID：</td>
                                    <td>
                                        <input type="text" name="data[sensor_code]" id="sensor_code" class="form-control" />

                                    </td>
                                </tr>
                                 <tr>
                                    <td class="tableleft">末端设备背景色：</td>
                                    <td>
                                        <input type="text"  name="data[sensor_color]" class="colorpicker form-control" id="sensor_color" /> 

                                    </td>
                                </tr>
                                <tr>
                                    <td class="tableleft">说明：</td>
                                    <td>
                                        <textarea class="form-control" rows="5" id="sensor_dec" name="data[sensor_dec]">{$datalist.sensor_dec}</textarea>
                                    </td>
                                </tr>

                                <tr>
                                    <td colspan="3">
                                        <input type="hidden" name="tijiao" id="tijiao" />
                                        <input type="submit" class="btn btn-primary waves-effect" id="sub" name="sub"
                                            value="保存" />&nbsp;&nbsp;&nbsp;&nbsp;
                                        <input type="reset" class="btn btn-success" value="清空" />
                                    </td>
                                </tr>

                            </table>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>
<block name="myscript">
    <script src="__PUBLIC__/assets/plugins/repeater/jquery.repeater.min.js"></script>     
    <script src="__PUBLIC__/assets/plugins/colorpicker/jquery-asColor.js"></script>
    <script src="__PUBLIC__/assets/plugins/colorpicker/jquery-asColorPicker.min.js"></script>
    <script src="__PUBLIC__/assets/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
    <script src="__PUBLIC__/web/js/common.js"></script>
    <script>
       
      

      $(".colorpicker").asColorPicker();



    </script>
</block>